Lab 1: Introduction to Quarto

Author

Your name goes here!

Published

Invalid Date

Part Two: Exploring Quarto Documents

Specifying Global Execute Options

Execution options specify how the R code in your Quarto document should be displayed. This guide provides descriptions on the options you can specify in a document’s execution.

Question 1 – Add your name and the date to the YAML.

Question 2 – Add an execute line to your YAML that includes the following options, (1) your source code is always output on the page, and (2) your document will render even if there are errors.

Running the Provided Code

1 + 1

Question 3 – Let’s spice this code up a bit. Delete 1 + 1 from the code chunk and paste in the code provided in the Lab 1 instructions.

Check the Data Documentation

Question 4 – In your console (not in the Quarto document), type ?ToothGrowth (or alternatively help(ToothGrowth).Use the information that pops up in the Help pane in RStudio to fill in the blanks below.

This dataset investigates the effect of _____ on tooth growth in ____.

The two supplement delivery methods include OJ (____) and VC (____).

ToothGrowth is a data frame with observations and _ variables.

Question 5Before the code chunk, change the “Running the Provided Code” section header to a header that better describes the contents of this section (e.g., Tooth Growth Dataset).

Creating a Plot

Question 6 – Replace the plot(pressure) code with the code provided in the Lab 1 instructions.

plot(pressure)

Now, run this code chunk! You should see two side-by-side boxplots, one plot comparing tooth length between the two supplement delivery methods and one plot comparing tooth length between the three different dosages uses.

Question 7 – Read over the Quarto documentation on figure options and add an option (#|) to the above code chunk to make the figures print side-by-side (i.e., in one row) in the rendered HTML file.

Question 8 – Specify in the code chunk options that these boxplots should be center aligned.

Question 9 – Specify a figure caption for the boxplots (using a code-chunk option).